﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CurrencyList.ascx.cs" Inherits="CurrencyList" %>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataSourceID="SqlDataSource1" DataKeyNames="CurrencyID" 
    onselectedindexchanged="GridView1_SelectedIndexChanged"
      OnRowDataBound="GridView1_RowDataBound" >
    <Columns>
        <asp:CommandField ShowSelectButton="True" />
        <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
        <asp:BoundField DataField="USDExchangeRate" HeaderText="USDExchangeRate" 
            SortExpression="USDExchangeRate" />
        <asp:BoundField DataField="CurrencyID" HeaderText="CurrencyID" 
            InsertVisible="False" ReadOnly="True" SortExpression="CurrencyID" 
            Visible="False" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:BankDataBaseConnectionString %>" 
    
    SelectCommand="SELECT [Name], [USDExchangeRate], [CurrencyID] FROM [Currency]">
</asp:SqlDataSource>

